package com.design.demo2;

public class test {

	public static void main(String[] args) {
		FBSettingWindow fbsw = new FBSettingWindow("功能键设置");

		FunctionButton fb1,fb2;
		fb1 = new FunctionButton("功能键1");
		fb2 = new FunctionButton("功能键2");
		
		Command command1,command2;
		command1 = new HelpCommand();
		command2 = new MinimizeCommand();
		
		//将命令对象注入功能键
        fb1.setCommand(command1);
        fb2.setCommand(command2);
        
        //功能键添加至功能键设置类
        fbsw.addFunctionButton(fb1);
        fbsw.addFunctionButton(fb2);
        //显示所有功能键
        fbsw.display();
        
        //调用功能键的业务方法
        fb1.onClick();
        fb2.onClick();
        
	        
	}
}
